import Taro, { Component } from '@tarojs/taro'
import { AtAvatar } from 'taro-ui'
import { View } from '@tarojs/components'
import { IProps, IState } from './schemas'
import './index.scss'

export default class extends Component<IProps, IState> {
    render() {
        const { avatar, data } = this.props
        console.log(data, 'aaaaaaa')
        return (
            <View className='avatar'>
                {
                    data.data && data.data.map((item, k) => (
                        <View className='cell' key={k} style={{ left: Taro.pxTransform(57 * (k + 3)), zIndex: k + 1 }}>
                            <AtAvatar circle size='small' image={item.avatarUrl}></AtAvatar>
                        </View>
                    ))
                }
            </View>
        )
    }
    static defaultProps = {
        avatar: 'https://zos.alipayobjects.com/rmsportal/ODTLcjxAfvqbxHnVXCYX.png',
        data: []
    }
}